package com.edu.spring.ioc.dao;

import com.edu.spring.ioc.datasource.MyDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
public class DeliveryDao {

    MyDataSource myDataSource;

    @Autowired
    public void setMyDataSource(MyDataSource myDataSource) {
        this.myDataSource = myDataSource;
    }

    public void saveDelivery() {
//        System.out.println("myDataSource = " + myDataSource);
        System.out.println("数据源：保存数据---" + myDataSource);
    }
}
